<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <button onclick="close_win()">关闭</button>
        <button onclick="mini_win()">最小化</button>
        <button onclick="new_win()">打开</button>
    </div>

</body>
</html>

<script>

    const constant = require('../../util/constant')
    const {ipcRenderer} = require('electron')

    function close_win() {
        ipcRenderer.send(constant.win.CLOSE)
    }

    function mini_win() {
        ipcRenderer.send(constant.win.MINIMIZE)
    }

    function new_win() {
        ipcRenderer.send(constant.win.NEW_WIN, {
                filepath:'./src/pages/goods/test.html',
                params:{
                    width: 400,
                    height: 300
                },
                data:{
                    name: '111111111111'
                }
        })
    }

    // let SqliteDB = require('./testSqlite').SqliteDB
    // let file = 'test.db'
    // let sqliteDB = new SqliteDB(file)
    //
    // sqliteDB.close()


</script>
